<html>
<head>
<title>Login Page</title>
<meta name="layout" content="main" />
</head>
<body>
<div class="body">
<g:if test="${flash.message}">
<div class="message">
${flash.message}
</div>
</g:if>

		<div id="menu">
		<ul id="main">
			<li class="current_page_item"><g:link controller="login">Inicio</g:link></li>
                         <g:each in="${session.category}" var="categ">
                           <li><g:link controller="evento" id="${categ?.id}">${categ?.nombre}<></g:link></li>
                         </g:each>
                        <g:if test="${session.user?.tipo == 'administrador'}" >
                            <li><g:link controller="administrador">Administracion</g:link></li>
                        </g:if>

		</ul>
	</div>
<!-- end header -->
<style type="text/css">
<!--
.Estilo1 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	color: #FFFFFF;
}
.Estilo2 {
		font-size: 10px;
			font-family: Arial, Helvetica, sans-serif;
			color: #FFFFFF}
-->
</style>
	<!-- start page -->
	<div id="page">
	
		<div id="content">
                  <table width="500">
                    
                    <tr>
                          <g:each status="i" in="${session.category}" var="categ" >
                            <g:if test="${(i % 2) == 0}" >
                                  </tr><tr><td bgcolor="#000000"><g:form controller="evento">
                                        <input type="submit"  value=" ${categ?.nombre}&nbsp;&nbsp;&nbsp;>>&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp"  class="save" style="BORDER: rgb(128,128,128) 1px none; FONT-SIZE: 8pt; FONT-FAMILY: Verdana; color: #FFFFFF; BACKGROUND-COLOR: rgb(0,0,0)"/>
                                        <g:link controller="evento" id="${categ?.id}"><img src="${resource(dir:'images',file:categ?.imagen)}" width="320" height="180"/></g:link>
                                        <input type="hidden" name="id" name="id" value="${categ?.id}"/>
                                        </g:form>
                                      </td>
                            </g:if>
                            <g:else>
                                    <td bgcolor="#000000"><g:form controller="evento">
                                        <input type="submit"  value=" ${categ?.nombre}&nbsp;&nbsp;&nbsp;>>&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp"  class="save" style="BORDER: rgb(128,128,128) 1px none; FONT-SIZE: 8pt; FONT-FAMILY: Verdana; color: #FFFFFF; BACKGROUND-COLOR: rgb(0,0,0)"/>
                                        <g:link controller="evento" id="${categ?.id}"><img src="${resource(dir:'images',file:categ?.imagen)}" width="320" height="180"/></g:link>
                                        <input type="hidden" name="id" name="id" value="${categ?.id}"/>
                                    </g:form>
                                    </td>
                            </g:else>
                          </g:each>
                    </td></tr>

                </table>
		  
		</div>
		<!-- end content -->
		<!-- start sidebars -->
		<div id="sidebar2" class="sidebar">
			<ul>
				<li>
                     <g:if test="${session.user}">
                     <span class="Estilo2"><b>Bienvenido a eel&nbsp;${session.user?.nombre}&nbsp;${session.user?.apellido}</b></span>
                     <br>
                     <g:link controller="usuario" action="show">Mi Perfil</g:link><br>
                     <g:link controller="login" action="logout">Logout</g:link>
                     </g:if>
                     <g:else>
                     <form action="log">
						<span class="Estilo1">Iniciar Sesion</span>
                                                <table> <tr><td><div><span class="Estilo2">Usuario:</span></div></td>
						<td valign="top" class="value ${hasErrors(bean:userInstance,field:'nickname','errors')}">
						<input type="text" id="nickname" name="nickname" value="${fieldValue(bean:userInstance,field:'nickname')}"/>
                                                </td></tr><tr><td><span class="Estilo2">Contraseña:</span></td>
						<td valign="top" class="value ${hasErrors(bean:userInstance,field:'contrasena','errors')}">
						<input type="password" id="contrasena" name="contrasena" value="${fieldValue(bean:userInstance,field:'contrasena')}"/>
						</td></table>
                                                <table><tr><td>
                                                      <div class="buttons" align="center">
                                                        <span class="button"><input class="save" type="submit" value="Login"/></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Estilo2"><g:link controller="login" action="recupera">¿Olvido su contraseña?</g:link></span>
                                                        <br /><span class="Estilo2"><g:link controller="usuario" action="create">Reg&iacute;strese</g:link></span>
                                                </div></td></tr>
                                                </table>
                                         </form>
                     </g:else>

					
				</li>
				
				
			 
			</ul>
		</div>
		<!-- end sidebars -->
		<div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end page -->
</div>
<div id="footer">
	<p class="copyright">&copy;&nbsp;&nbsp;2009 All Rights Reserved &nbsp;&bull;&nbsp; Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div>
</body>
</html>